﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage<IceScream.Models.Service>" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Ice cream - Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="AdminContent" runat="server">

    <h2>Create</h2>

     <form id="Form1" action="" enctype="multipart/form-data" method="post" runat="server">

        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Name) %>
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
               <CKEditor:CKEditorControl ID="Description" BasePath="~/Content/ckeditor" runat="server" 
                FilebrowserImageBrowseUrl= '/Content/ckfinder/ckfinder.html'
                FilebrowserImageUploadUrl= '/Content/ckfinder/core/connector/asp/connector.asp'
                FilebrowserBrowseUrl='/Content/ckfinder/ckfinder.html'
                FilebrowserUploadUrl='/Content/ckfinder/core/connector/asp/connector.asp'>
                    <%: Model.Description %>
               </CKEditor:CKEditorControl>
                <%: Html.ValidationMessageFor(model => model.Description)%>
            </div>

            <div class="editor-label">
            <%: Html.Label("Image")%>
            </div>          
            <div class="editor-field">
                <input id="Image" name="Image" type="file" />
            </div>

            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    </form>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

